<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport"	content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<link rel="stylesheet"	href="${pageContext.request.contextPath}/bettery/css/itao.css" />
		<script type="text/javascript"	src="${pageContext.request.contextPath}/dewei/js/jquery.js"></script>
		<script type="text/javascript"	src="${pageContext.request.contextPath}/bettery/js/jquery.validate.min.js"></script>
		<script type="text/javascript"	src="${pageContext.request.contextPath}/bettery/js/bettery_common.js"></script>
		<script type="text/javascript"	src="${pageContext.request.contextPath}/bettery/js/template.js"></script>
		<script type="text/javascript">
function closeWindow() {
	var ua = navigator.userAgent.toLowerCase();
	if (ua.match(/MicroMessenger/i) == "micromessenger") {
		WeixinJSBridge.call('closeWindow');
	} else {
		if (navigator.userAgent.indexOf("MSIE") > 0) {
			if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {
				window.opener = null;
				window.close();
			} else {
				window.open('', '_top');
				window.top.close();
			}
		} else if (navigator.userAgent.indexOf("Firefox") > 0) {
			window.location.href = 'about:blank ';
		} else {
			$("#searchForm").submit();
		}
	}
}
</script>
	</head>
	<body onload="hideLoading()">
		<div class='search_bar'>
			<span class='new-btn right' onclick="closeWindow()"> <a>保存返回</a>
			</span>
		</div>
		<form id='searchForm' action="main.do" method="post">
			<s:hidden name="wxid" />
			<input type="hidden" name="lat" value="${model.lat}" />
			<input type="hidden" name="lng" value="${model.lng}" />
			<div class="col-lg-12 m-t">
				<div id="successPage" class="inner" style="position: relative;"	align="center">
					<div style='color: red; font-size: 24px'>
						<b>恭喜您，预约成功！</b>
					</div>
					<div  style="margin-top: 10px; font-size: 12px;">
						您的订单号为：
						<b  style="font-size: 20px; color: red;">${model.dingDanUid}</b>
					</div>

					<div class='panel m-t' style='background: #E4E4E4'>
						<div		style='color: green; height: 30px; text-indent: 14px; 10 px 18px 0; line-height: 24px; text-align: left'>
							订单信息如下
						</div>
						<img src='${pageContext.request.contextPath}/bettery/icons/connect.png' width='100%' />
						<div class="panel-body" id="dingdanInfo" align="left">
						</div>
					</div>
					<div style="text-align: left; font-size: 13px;">
					</div>
				</div>
			</div>
		</form>

		<script id="test" type="text/html">
{{if "附近门店更换"==changeType}} 
				<div class="mendianDiv" style="display: block;">
				<table>
					<tr>
						<td>
{{if imageUrl}} <img id='dianchiImge1' src="{{imageUrl}}" width="60px" height="60px">{{/if}}
{{if !imageUrl}} <img id='dianchiImge1' src="${pageContext.request.contextPath}/dewei/img/tianneng.jpg" width="60px" height="60px">{{/if}}
						</td>
						<td>
							<div style="height: 20px; font-size: 13px; ">
								换购品牌：<span id="showPinpai1">{{pinPai}}</span>
							</div>
							<div style="height: 20px; font-size: 13px;">
								换购型号：<span id="showXinghao1">{{xingHao}}</span>
							</div>
							<div style="height: 20px; font-size: 13px; ">
								换购价格：
								<font id='showPrice1' >{{price}}</font>元
							</div>
						</td>
					</tr>
				</table>
				<hr/>
				 <table  style="margin-left: 0px">
			        <tr>
					 <td style="width:60px;">
{{if mendianImageUrl}} <img id='mendianImge1' src="{{mendianImageUrl}}" width="60px" height="60px">{{/if}}
{{if !mendianImageUrl}} <img id='mendianImge1' src="${pageContext.request.contextPath}/dewei/img/category.jpg" width="60px" height="60px">{{/if}}
				      </td>
				      <td>
				      <div  style="height: 20px; font-size: 13px; ">
				                        门店名称：<span id="showName1">{{mendianName}}</span>
				      </div>
				      <div  style="height: 20px; font-size: 13px; ">
				                     联&nbsp;系&nbsp;人：<span id="showLxr1">{{mendianLxr}}</span>
				      </div>
				      <div  style="height: 20px; font-size: 13px; ">
				                      联系电话：<span id="showLxTel1">{{menDianTel}}</span>
				      </div>
				      </td>
				     </tr>
				     <tr>
				      <td colspan="2">
				                         服务类型：<span id="showGenghuanType1"><font style="font-size: 13px;"  color="red"><b>门店更换</b></font></span>
				      </td>
				     </tr>
				     <tr>
				      <td colspan="2">
				        <table border="0px;" cellpadding="0px;" cellspacing="0px;"><tr><td  style='vertical-align: top;width:66px;'>门店地址：</td><td><span id="showAddr1">{{mendianAddr}}</span></td></tr></table>           
				      </td>
				     </tr>
				    </table>
				<hr />
				&nbsp;<font style="font-size: 12px"  color="red">温馨提示：</font>
				<br/>
				<table  style="margin:0px;font-size: 12px;padding: 0px;">
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td  style="margin:0px;padding: 0px;">点击“保存返回”后您的订单信息会自动保存至手机；</td>
					</tr>
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td style="margin:0px;padding: 0px;">当您去门店更换时，请到【用户中心】-【我的订单】查看您的订单；</td>
					</tr>
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td style="margin:0px;padding: 0px;">此换购价格48小时内有效，请您尽快到指定门店更换。</td>
					</tr>
				</table>
				
				</div>
				{{/if}}
{{if "附近无网点"==changeType}} 
				<table>
					<tr>
						<td>
{{if imageUrl}} <img id='dianchiImge1' src="{{imageUrl}}" width="60px" height="60px">{{/if}}
{{if !imageUrl}} <img id='dianchiImge1' src="${pageContext.request.contextPath}/dewei/img/tianneng.jpg" width="60px" height="60px">{{/if}}
						</td>
						<td>
							<div	style="height: 20px; font-size: 13px; ">
								换购品牌：<span id="showPinpai1">{{pinPai}}</span>
							</div>
							<div	style="height: 20px; font-size: 13px;">
								换购型号：<span id="showXinghao1">{{xingHao}}</span>
							</div>
							<div	style="height: 20px; font-size: 13px; ">
								换购价格：
								<font id='showPrice1' >{{price}</font>元
							</div>
						</td>
					</tr>
				</table>
				<hr/>
				<table  style="margin-left: 0px">
					<tr>
						<td>
							服务类型：<font style="font-size: 13px;"   color="red"><b>附近无网点</b></font>
						</td>
					</tr>
					<tr>
						<td>
							您的姓名：<span id="showName3">{{kehuName}}</span>
						</td>
					</tr>
					<tr>
						<td>
							<table border="0px;" cellpadding="0px;" cellspacing="0px;"><tr><td  style='vertical-align: top;width:66px;'>您的地址：</td><td><span id="showAddr3">{{address}}</span></td></tr></table>
						
						</td>
					</tr>
					<tr>
						<td>
							联系电话：<span id="showLxTel3">{{lxTel}}</span>
						</td>
					</tr>
					
				</table>
				<hr />
				&nbsp;<font style="font-size: 12px"  color="red">温馨提示：</font>
				<br/>
				<table  style="margin:0px;font-size: 12px;padding: 0px;">
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td  style="margin:0px;padding: 0px;">点击“保存返回”后您的订单信息会自动保存至手机；</td>
					</tr>
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td style="margin:0px;padding: 0px;">当您去门店更换时，请到【用户中心】-【我的订单】查看您的订单；</td>
					</tr>
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td style="margin:0px;padding: 0px;">提交订单后，请等待客服人员联系您。</td>
					</tr>
				</table>
{{/if}}
{{if "人工上门更换"==changeType}} 
				<table>
					<tr>
						<td>
{{if imageUrl}} <img id='dianchiImge1' src="{{imageUrl}}" width="60px" height="60px">{{/if}}
{{if !imageUrl}} <img id='dianchiImge1' src="${pageContext.request.contextPath}/dewei/img/tianneng.jpg" width="60px" height="60px">{{/if}}
						</td>
						<td>
							<div	style="height: 20px; font-size: 13px; ">
								换购品牌：<span id="showPinpai1">{{pinPai}}</span>
							</div>
							<div	style="height: 20px; font-size: 13px;">
								换购型号：<span id="showXinghao1">{{xingHao}}</span>
							</div>
							<div	style="height: 20px; font-size: 13px; ">
								换购价格：
								<font id='showPrice1' >{{price}}</font>元
							</div>
							<div	style="height: 20px; font-size: 13px; ">
								上门服务：
								<font id='showPrice1' >{{serverPrice}}</font>元
							</div>
						</td>
					</tr>
				</table>
				<hr/>
				<table style="margin-left: 0px">
					<tr>
						<td>
							客户姓名：<span id="showKehuName2">{{kehuName}}</span>
						</td>
					</tr>
					<tr>
						<td>
							联系电话：<span id="showLxTel2">{{lxTel}}</span>
						</td>
					</tr>
					<tr>
						<td style="position: relative;">

							<table border="0px;" cellpadding="0px;" cellspacing="0px;"><tr><td  style='vertical-align: top;width:66px;'>联系地址：</td><td><span id="showAddr2">{{address}}</span></td></tr></table>
						</td>
					</tr>
					<tr>
						<td>
							服务类型：<font style="font-size: 13px;"  color="red"><b>上门更换</b></font>
						</td>
					</tr>
					<tr>
						<td>
							上门时间：<span id="showTime2">{{time}}</span>
						</td>
					</tr>
				</table>
				<hr />
				&nbsp;<font style="font-size: 12px"  color="red">温馨提示：</font>
				<br/>
				<table  style="margin:0px;font-size: 12px;padding: 0px;">
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td  style="margin:0px;padding: 0px;">点击“保存返回”后您的订单信息会自动保存至手机；</td>
					</tr>
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td style="margin:0px;padding: 0px;">当您去门店更换时，请到【用户中心】-【我的订单】查看您的订单；</td>
					</tr>
					<tr>
					<td style="vertical-align: top"><font color="red" >*</font></td>
					<td style="margin:0px;padding: 0px;">本网将在24小时之内与您联系安排人员上门更换。</td>
					</tr>
				</table>
				{{/if}}
</script>
		<script>
var model = {
	changeType : '${model.changeType}',
	imageUrl : '${model.imageUrl}',
	pinPai : '${model.pinPai}',
	xingHao : '${model.xingHao}',
	price : '${model.price}',
	mendianImageUrl : '${model.mendianImageUrl}',
	mendianName : '${model.mendianName}',
	mendianLxr : '${model.mendianLxr}',
	menDianTel : '${model.menDianTel}',
	mendianAddr : '${model.mendianAddr}',
	kehuName : '${model.kehuName}',
	lxTel : '${model.lxTel}',
	serverPrice : '${model.serverPrice}',
	time : '${model.time}',
	address:'${model.address}'
};
var html = template('test', model);
document.getElementById('dingdanInfo').innerHTML = html;
</script>
	</body>
</html>